<?php if ($ticket->isOpenCloseAllowedBy($sf_user->getGuardUser()->Profile->getRawValue())): ?>


  <?php if ($ticket->is_closed): ?>
    <?php echo link_to('Открыть тикет','@ticket_open?id='.$ticket->id,array('class'=>'open-close-ticket-button')) ?>
  <?php else: ?>
    <?php echo link_to('Закрыть тикет','@ticket_close?id='.$ticket->id,array('class'=>'open-close-ticket-button')) ?>
  <?php endif ?>
  
    
<?php endif ?>